package io.datajek.springbasics.movierecommendersystem.lesson7;
import io.datajek.springbasics.movierecommendersystem.lesson2.Filter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
@Component
public class Recommenderlmplementation2 {
    private  Filter filter;
    @Autowired
  @Qualifier("contentBasedFilter")
    public void setFilter(Filter filter){
        this.filter=filter;
    }
    public String [] recommendmovies(String movie){
        System.out.println("正在使用的过滤器名称：" + filter);
        String [] results=filter.getRecommendations("推荐电影");
        return results;
    }
}
